-
Notifications
You must be signed in to change notification settings - Fork 83
Improve .env discovery
#737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| if env_path.exists(): | ||
| # Step 3: Load .env file if it exists (searches upward through parent directories) | ||
| console.print("\nSearching for .env file...", style="dim") | ||
| env_path = find_env_file() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the implications if this traverses very far up (say, ~/, or C:\ on Windows) and finds a random .env file? What could accidentally be in memory?
Resolves TOO-201
Documentation PR for this is here: ArcadeAI/docs#626
Note
Improves environment handling by discovering
.envfiles via upward traversal and wiring it through server and CLI flows.find_env_file()inarcade_mcp_server.settingsand use it inMCPSettings.from_env()for auto-loading.envMCPAppreload to watch.pyfiles and the discovered.env(even outsidecwd) and include it in watcher pathsconfigure.get_tool_secrets()now loads secrets from discovered.envdeploysearches for.env, loads it, and only uploads--secrets allwhen a file existsutils.resolve_provider_api_key()now searches upward for.env.env.exampleto project root with clear guidance.envdiscovery andconfigure.get_tool_secrets(); introduce env isolation fixture to prevent leakage between testsarcade-mcp-server→1.15.0;arcade-mcp→1.9.0and update dependency pins accordinglyWritten by Cursor Bugbot for commit 83cd2b3. This will update automatically on new commits. Configure here.